import dgRequest from '../'

export function createWoker(woker) {
  return dgRequest.post({
    url: '/staff/create',
    data: woker
  })
}

export function getWokers(limit, offset) {
  return dgRequest.get({
    url: '/staff/list',
    params: {
      limit,
      offset
    }
  })
}

export function updateWoker(woker) {
  return dgRequest.patch({
    url: '/staff/update',
    data: woker
  })
}

export function deleteWoker(id) {
  return dgRequest.delete({
    url: `/staff/delete/${id}`
  })
}